%% COMP_Pme
%%	+Pme	PC meets an enemy pilot under somewhat peaceful circumstances

Plot
	name <Recruiting Drive>
	Size 1
	desc <An enemy of the enemy will try to recruit the PC.>
	requires <#A +T-- +Pme E:++ P:-->

	% E1 is an enemy of the enemy character in the episode city
	% E2 is the faction that E1 belongs to
	% E3 is a scene for a meeting
	% E4 is the enemy character's faction
	% E5 is a second character to approach for a mission
	% E6 is a scene for the next mission
	Element1 <Character !Near -7 !Enemy -1 -Enemy !Okay -7>
	Place1 <3 (Citizens) pass>
	Element2 <Faction !Comrade 1>
	Element3 <Scene Building Public !Near -7 !Okay 1>
	Element4 <Faction !Comrade -1>
	Element5 <Character !Near 3 !Comrade 2 Neverfail>
	Place5 </>
	Element6 <Scene Building Public !Near -7 !Okay 1>

	start <ifNPCDead %1% LoseComp 0 .loss>
	.loss <+T-->

	sub
		Persona 1
		rumor <%name1% is recruiting people to oppose %name4%.>
		*greeting <*AreYouHereAboutJob&Recruit GoExplain>
		GoExplain <NewChat Say 1 AddChat 1 AddChat 2 AddChat 3 AddChat 4>
		GoEnd <SMemo 4  &SetTargetNPC %5% WinComp %6% .next>
		.next <+Tgt +Fmi>
		result1 <NewChat Say 2 History 3 CashPrize Reward StoryDL 200 XPV 100 SetPCFac %2% &SetAllyFac %2% Goto GoEnd>
		result2 <NewChat Say 5 History 6 Goto GoEnd>
		result3 <NewChat Say 7 History 6 Goto GoEnd>
		result4 <NewChat Say 7 &SetAllyFac PCFac FacXP+ PCFac 1 History 6 Goto GoEnd>
		Msg1 <We at %name2% are looking for some new recruits to oppose the recent operations of %name4%. Are you willing to take a stand and join us?>
		Msg2 <Great! It's important that %name4% be stopped, before they gain any more power. Here's a signing bonus. You should head over to %name6% as soon as you can; %name5% needs someone for a mission.>
		Msg3 <You joined %name2% to fight %name4%.>
		Msg4 <%name1% said that %name5% in %name6% might have a mission for you.>
		Msg5_1 <That's too bad. Still, if you're looking for work, %name5% in %name6% needs a pilot for an upcoming mission. Tell \OPR %5% that I sent you and you'll be accepted for sure.>
		CMsg5_1 <ifG React 15 Accept>
		Msg5_2 <No big loss. Still, if you're looking for work, we need a pilot for an upcoming mission. Go talk to %name5% at %name6% if you're interested.>
		CMsg5_2 <ifG 16 React Accept>
		Msg6 <You refused an offer by %name1% to join %name2%.>
		Msg7 <We won't refuse any help, not with %name4% continuing to gain power. Go see %name5% at %name6%; I believe \SPR %5% has a mission you could do.>
		Prompt1 <I am.>
		Prompt2 <No, definitely not.>
		Prompt3 <I'll help, but I'm not joining anything.>
		CPrompt3 <if= PCFac 0 Accept>
		Prompt4 <I'll help, but I've already got a job.>
		CPrompt4 <if# PCFac 0 Accept>
	end

Plot
	name <Loyalty Check>
	size 2
	desc <PC questioned by authorities; revealed there have been attacks lately.>
	requires <#A +T-- +Pme E:++ (F:MILIT|F:POLIT|F:--) -F:ENEMY -L:ENEMY ~L:ALLY ~+Gre ~E:FRIEND>

	% E1 is the scene for this component
	% E2 is the NPC to do the interrogation
	% E3 is your enemy character, needed for the conversation
	element1 <Scene Government !Near -7 !Enemy -1>
	element2 <Character police !near 1 !Ally -7 NeverFail>
	neverfail2 <police officer>
	place2 <1 (Citizens) ally pass>
	Element3 <Grab 1>

	% V1 = Email Counter
	5Min <if= V1 0 if= d10 1 email 1 V= 1 1>
	Msg1_1 <%name2%@ \NARRATIVE 7 :// You are wanted for questioning. Please report to %name1% as soon as possible.>

	start <ifNPCDead %2% LoseComp 0 .loss>
	.loss <+T-->

	sub
		Persona 2
		% V1 = Enemy Faction ID
		rumor <%name2% has been asking a lot of questions about you.>
		greeting <V= 1 N2  NewChat Say 1 AddChat 1 AddChat 2 AddChat 3>
		GoWin <StoryNote 3  WinComp 0 .changes>
		.changes <+Pun +T-- +F-->
		result1 <NewChat Say 2                                     AddChat 4 AddChat 5  Goto GoWin>
		result2 <NewChat Say 4  AddReact -d6  AddNPCReact N1 5     AddChat 4 AddChat 5  Goto GoWin>
		result3 <NewChat Say 5  AddReact d8                        AddChat 4 AddChat 5  Goto GoWin>
		result4 <                                       Goto GoBigQuestion>
		result5 <AddNPCReact N1 10  AddSociable -d10    Goto GoBigQuestion>
		GoBigQuestion <NewChat ifFactionAlly RootSceneFac else GoAskQuestion Say 6>
		GoAskQuestion <Say 7  AddChat 6 AddChat 7 AddChat 8>
		result6 <NewChat Say 8   AddEasygoing -d10   AddReact -d10>
		result7 <NewChat Say 9   PCFEnemy V1  AddReact d10  AddLawful 1>
		result8 <NewChat Say 10  AddEasygoing d10   AddReact -d10>
		Msg1 <Hello \PC , I've been waiting for you. I'll get straight to the point: You were recently seen in the company of a known enemy agent. How do you plead?>
		Msg1_2 <I've been looking for you. You should know that you're under investigation. We have surveillance video of you meeting with a known enemy agent, possibly collaborating with \OPR N1 , and I need to know why.>
		CMsg1_2 <ifPCCriminal Accept>
		Msg1_3 <\PC , I was hoping to speak with you. It seems that you were recently in the company of someone who may be an enemy agent. Would you care to respond?>
		CMsg1_3 <ifPCLawful Accept>
		Msg2 <You met with %name3% , who may be here on a subversive mission. Recently unauthorized mecha have been spotted. We may be looking at an invasion, or worse.>
		Msg3 <You were investigated by \ELEMENT 2 for meeting with an enemy.>
		Msg4 <\NARRATIVE 1 is collaborating with the enemy. Recently unauthorized mecha have been spotted nearby. We may be looking at an invasion, or worse.>
		Msg5 <I'm not saying that you did, but \NARRATIVE 1 is an enemy agent, and we need all the information we can get. Recently unauthorized mecha have been spotted nearby. We may be looking at an invasion, or worse.>
		Msg6 <I know your loyalty lies with \FACTION RootSceneFac , but even speaking with an enemy agent is dangerous. You could give away vital information without knowing it... Be careful.>
		Msg7 <The main thing I need to know is, where do your loyalties lie? Will you stand with \FACTION RootSceneFac or are you going to betray us?>
		Msg8  <I see. Well, I'll be keeping my eye on you. If you have any further contact with the enemy we'll know about it.>
		Msg9  <That's good to hear. Stay vigilant... The enemies of our city are everywhere.>
		Msg10 <Then I suggest you think about it. Do you really want to betray \SCENE RootSceneID and everyone who lives here?>
		prompt1 <I don't know what you're talking about.>
		prompt1_1 <Enemy agent? What are you talking about?>
		Prompt2 <Maybe I was. So what?>
		Prompt2_1 <Is it illegal to talk with people now?>
		Prompt3 <Whatever I did, I broke no laws.>
		Prompt3_1 <You know I'd never break any laws.>
		CPrompt3 <ifG PCRep 2 0 Accept>
		Prompt4 <I promise it won't happen again.>
		Prompt5 <Just stay out of my business from now on, okay?>
		Prompt6 <I'm loyal to no-one but myself.>
		Prompt7 <I won't betray \FACTION RootSceneFac .>
		Prompt8 <I don't know...>
	end

Plot
	name <Wager For Friend>
	desc <The PC can secure his friend's freedom by betting his own freedom and fighting a duel.>
	requires <#A +Pme +T-- E:FRIEND (F:MILIT|F:CRIME|F:POLIT) -F:ENEMY ~P:PDASS>
	Size 1

	% E1 is the friend/enemy
	% E2 is the enemy faction
	% E3 is a public scene to use for a meeting
	% E4 is the member of E2
	% E5 is an environs scene for the duel
	Element1 <Grab 1>
	Element2 <Grab 2>
	Element3 <Scene Public !Near -7 !Okay 2>
	Element4 <Prefab>
	Place4 <3 (Citizens) Pass>
	Element5 <Scene Environs !Near -7>

	% P%id%01 = Nature of Wager
	%		0: PC joins EnemyFac if he loses
	%		1: PC pays $100000 if he loses
	%		2: No bad effect if PC loses
	start <if= PlotStatus %plotid% 0 ifNPCDead %4% LoseComp 0 .next>
	.next <+T-- +F-->

	% SubPlot1 is the duel
	% SubPlot2 is the release of E1, if the duel is won
	% SubPlot3 is the forcible recruitment of the PC, if the duel is lost
	SubPlot1 <*CS_Duel&NoDerailment 4 3 5>
	SubPlot2 <*CS_FriendFired_Win 1 2>
	SubPlot3 <*ForcedInduction 4 2>

	% Needed scripts for the duel
	.%id1%_%plotid%_GoWin <FreezeNPC %4% &SetEnemyNPC %4% SetXXRAttitude %4% XXR_A_IsSenior StoryNote 1 SetPlotStatus %plotid% %id2%>
	.%id1%_%plotid%_GoLose <if= P%id%01 0 else GoCheckCash ifPCOK else GoPCDown &SetEnemyNPC 0 &SetEnemyFac 0 SetPlotStatus %plotid% %id3%>
	GoPCDown <FreezeNPC %4% StoryNote 2 LoseComp 0 .next>
	GoCheckCash <FreezeNPC %4% if= P%id%01 1 else GoNoBadEffect ifG PC$ 99999 else GoNotEnough cash+ -100000 Goto GoNoBadEffect>
	GoNotEnough <cash+ -PC$   AddRenown -5   Goto GoNoBadEffect>
	GoNoBadEffect <SMemo 0   LoseComp 0 .next>
	.next <+Pun +T-- +F-->

	Msg1 <You defeated %name4%, who should now release %name1% from %name2%.>
	Msg2 <%name4% left you behind for dead.>

	sub
		Persona 4
		rumor0 <%name4% from %name2% has been spotted in %name3%.>
		% V1 = Have spoken before
		greeting <if= PlotStatus %plotid% 0 else GoChat if= V1 1 else GoFirstTime NewChat Say 17 AddChat 1 AddChat 2 AddChat 3>
		*GoFirstTime <*IWantToTalkAboutNPC %1% GoMakeDeal>
		*GoChat <*MISC_CHATTER>
		GoMakeDeal <NewChat V= 1 1 Say 1 SMemo 2 AddChat 1 AddChat 2 AddChat 3>
		result1 <NewChat Say 3 AddChat 4 AddChat 5 AddChat 6 AddChat 7>
		result2 <EndChat Say 4 StoryNote 5 &SetEnemyNPC 0 &SetEnemyFac 0 SetPlotStatus %plotid% %id3%>
		result3 <NewChat Say 6 StoryNote 7 &SetEnemyNPC %4% SetXXRAttitude %4% XXR_A_IsSenior FreezeNPC %4% NegateComp 0 .negate>
		.negate <+T-- +P-->
		result4 <EndChat Say 8 SMemo 9 History 10 SetPlotStatus %plotid% %id1%>
		result5 <ifG PC$ 99999 else GoR5NoMoney ifConversation SkillTar StoryDL else GoR5Fail EndChat Say 8 SMemo 11 History 10 P= 1 1 SetPlotStatus %plotid% %id1%>
		GoR5Fail <NewChat Say 12 AddChat 4 AddChat 6 AddChat 7>
		GoR5NoMoney <NewChat Say 13 AddChat 4 AddChat 6 AddChat 7>
		result6 <EndChat Say 14 SMemo 15 History 10 P= 1 2 SetPlotStatus %plotid% %id1%>
		result7 <NewChat Say 16>
		Msg1 <I recruited %name1% for %name2% a little while ago. I think \SPR %1% 'll make a good addition to our forces... From the sound of your voice, I take it that you are not happy about this?>
		Msg2 <%name4% recruited %name1% for %name2% ; \SPR %4% can be found at %name3%.>
		Msg3 <Well, I can't very well do that, but if you're serious about this I propose a wager. I'll face you in a duel. If you win, I will release %name1% from %name2%, but if I win... what do you propose?>
		Msg4 <If you're really serious, I can make your wish come true.>
		Msg5 <You joined %name2% along with %name1%.>
		Msg6 <If you oppose %name2% then you are a fool. It can only lead to your death.>
		Msg7 <You met %name4%, who recruited %name1% into %name2%.>
		Msg8 <I accept your terms. Meet me in %name5% and we can begin.>
		Msg9 <You must duel %name4% at %name5% to decide the fate of %name1%. If you lose, you must join %name2% yourself.>
		Msg10 <You agreed to duel %name4% over the fate of %name1%.>
		Msg11 <You must duel %name4% at %name5% to decide the fate of %name1%. If you lose, you must pay $100,000.>
		Msg12 <That's not nearly enough. Surely you must have a better offer?>
		Msg13 <You don't look like you have that kind of money. Can't you offer anything else?>
		Msg14 <You're right, I don't. This is more of a lesson for you in the futility of opposing %name2% ... Meet me at %name5% whenever you're ready, and I'll show you why you have no chance to win.>
		Msg15 <You must duel %name4% at %name5% to decide the fate of %name1%.>
		Msg16 <You do that.>
		Msg17 <Oh, it's you again. What do you want?>
		Prompt1 <I want you to release %name1% at once.>
		Prompt2 <I want to join %name2% too.>
		CPrompt2 <ifFactionEnemy SceneFac &EpisodeScene Accept>
		Prompt3 <I just want you to know that I'll fight you.>
		Prompt4 <I'll join %name2% as well.>
		Prompt5 <I'll pay $100,000.>
		Prompt6 <You don't really expect to lose, do you?>
		CPrompt6 <ifTaunt HardSkillTar StoryDL Accept>
		Prompt7 <I'll think about it.>

	end
	inv
		NPC Soldier
		update <if= V1 0 V= 1 1 SetSelfFaction %2%>
	end

